package com.itcast.cheetah.rabbitmq.delay;

import com.itcast.cheetah.rabbitmq.config.XDelayedMessageConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @className: DelayedMQReciever
 * @description: 接收者
 * @author: cheetah
 * @date: 2022/2/7 17:40
 * @Version: 1.0
 */
@Component
@RabbitListener(queues = XDelayedMessageConfig.DIRECT_QUEUE)//监听队列名称
public class DelayedMQReciever {


    @RabbitHandler
    public void process(String message){
        System.out.println("DelayedMQReciever接收到的消息是："+ message);
    }
}
